<h1>Usuários</h1>

<div class="actions">
  <%= link_to "Novo", new_user_path %>
</div>

<table>
  <thead>
    <tr>
      <th>Nome</th>
      <th>Email</th>
      <th>Nome de usuário</th>
      <th>Ativo</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <% @users.each do |user| %>
      <tr>
        <td><%= link_to user.name, user %></td>
        <td><%= link_to user.email, user %></td>
        <td><%= link_to user.username, user %></td>
        <td><%= user.active %></td>
        <td><%= link_to "Editar", edit_user_path(user) %></td>
      </tr>
    <% end %>
  </tbody>
</table>
